<template>
  <h1>杨硕EL_单选组件</h1>
  <el-radio-group v-model="edu">
    <el-radio label="学历：高中" value="高中"></el-radio>
    <el-radio label="学历：专科" value="专科"></el-radio>
    <el-radio label="学历：本科" value="本科"></el-radio>
    <el-radio label="学历：硕士" value="硕士"></el-radio>
  </el-radio-group>
  <h4>您选择的学历为：{{edu}}</h4>
  <el-radio-group v-model="res">
    <el-radio v-for="item in arr" :label="item.title" :value="item.price"></el-radio>
  </el-radio-group>
  <h4>您选择的价格是：{{res}}</h4>
</template>
<script setup>
import {ref} from "vue";

const edu=ref(["高中"])
const arr=ref([
  {title:'杨硕爱吃糖',price:1000},
    {title:'杨硕爱睡觉',price:2000},
    {title:'杨硕爱打豆豆',price:3000},
    {title:'杨硕爱欺负徐志杰',price:4000},
    {title:'杨硕爱吃雪糕',price:5000}
])
const res=ref(4000);
</script>


<style scoped>

</style>